package com.yawn.zdweb.controller;

import com.yawn.zdweb.controller.entity.RestResponse;
import com.yawn.zdweb.defect.HistoricalService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HistoricalController {

    @Resource
    private HistoricalService historicalService;

    @GetMapping("/his/started")
    public RestResponse myStarted(int first, int size) {
        return historicalService.myStarted(first, size);
    }

    @GetMapping("/his/finished")
    public RestResponse myFinished(int first, int size) {
        return historicalService.myFinished(first, size);
    }

    @GetMapping("/his/list")
    public RestResponse listDefect(String proCode, int first, int size) {
        return historicalService.listDefect(proCode, first, size);
    }

}
